#include "StdAfx.h"
#include "SysSingleLock.h"


CSysSingleLock::CSysSingleLock( CRITICAL_SECTION * cs)
{
	pcs = cs;
	if(pcs == NULL)
	{
		return;
	}
	InitializeCriticalSection(pcs);
	EnterCriticalSection(pcs);
}


CSysSingleLock::~CSysSingleLock(void)
{
	if(pcs == NULL)
	{
		return;
	}
	LeaveCriticalSection(pcs);
	DeleteCriticalSection(pcs);
}
